$(function () {
   obj.init();
});
var obj = new function () {
    'use strict';
    return {
        form:null,
        staffId:null,
        init:function () {
            this.staffId = xhTool.getQuery('staffId');
            this.listener();
        },
        listener:function () {
            var $this = this;

        },
        funObj:function () {
            var $this = this;
            return {
                openAddForm:function () { //新增家庭组成
                    window.top.xhTop.showModal({
                        title: '新增家庭成员',
                        content: '<iframe src="'+moduleUrl+'staff_info/familyForm?staffId='+$this.staffId+'"  style="width: 100%;;border-style: none;padding: 0px;height: 300px;"  scrolling="yes"   ></iframe>',
                        button:'提交',
                        backClose: false
                    });
                },
                openEditForm:function (id) {
                    window.top.xhTop.showModal({
                        title: '编辑家庭成员',
                        content: '<iframe src="'+moduleUrl+'staff_info/familyForm?staffId='+$this.staffId+'&iSCId='+id+'"  style="width: 100%;;border-style: none;padding: 0px;height: 300px;"  scrolling="yes"   ></iframe>',
                        button:'提交',
                        backClose: false
                    });
                },
                askDelAction:function (id) {
                    xhExtra.askChangeStatus('hrm/staff_info/delFamily',{id:id},null,'确定要删除么',function (res) {
                        window.top.xhTop.showSuccess(res.msg);
                        location.reload();
                    })
                }
            }
        }
    }
};